home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-11-15 | 5.5 KB | 131 lines | [TEXT/MPS ] |
- #
- # makefile for "rsrcCompress.r", the example for InstaCompOne resource compression
- #
- #
- # to build installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompress" ( note: ".r" is omitted )
- #
- # to build debug version of installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompress.debug" ( note: ".r" is omitted )
- #
- #
- # mark young - 08/17/94
- #
-
- # • script names
-
- # the installer script name
- scriptName = rsrcCompress
- # the debug version installer script name
- debugScriptName = "{scriptName}.debug"
- # filename for ScriptCheck extension that will run when ScriptCheck does
- localScriptCheckExtName = {scriptName}.scx
-
-
- # • tool names
-
- # InstaCompOne compression tool
- compressTool = :::InstaCompOne 1.0:InstaCompOneTool
-
- # Splitting tool
- splitTool = :::InstaCompOne 1.0:FileAndRsrcSplitterTool
-
- # Original ScriptCheck Extension
- ScriptCheckExtension = :::InstaCompOne 1.0:InstaCompOneSCExt.rsrc
-
- # • support directory names
-
- # directory where ScriptCheck MPW tool can be found
- ScriptCheckDir = :::ScriptCheck 4.0.3:
- # directory where RIncludes can be found
- InstallerRIncDir = :::DeveloperInterfaces:RIncludes:
- # directory where the Installer Debugger can be found
- InstallerDebuggerDir = :::Installer Debugger 4.0:
-
-
- # source file containing the two example resources
- SourceFileName = source.rsrc
-
- # • simple compression example
-
- # archive containing compressed resource
- CompressedRsrcArchive = :Disk 1:CompressedRsrcTome
-
- # • split compression example
-
- # interim file containing both pieces of split resource
- TempSplitFile = SplitResource
- # interim file containing first piece of split resource
- TempRenamedFile1 = SplitResourceRenamed1
- # interim file containing second piece of split resource
- TempRenamedFile2 = SplitResourceRenamed2
- # archive containing first split and compressed piece
- SplitCompRsrcArchive1 = :Disk 1:SplitCompRsrcTome1
- # archive containing second split and compressed piece
- SplitCompRsrcArchive2 = :Disk 2:SplitCompRsrcTome2
-
-
- # • split example
-
- # interim file containing both pieces of split resource
- TempSplitFile2 = SplitResource2
- # archive containing first split piece
- SplitRsrcArchive1 = :Disk 1:SplitRsrcTome1
- # archive containing second split piece
- SplitRsrcArchive2 = :Disk 2:SplitRsrcTome2
-
- # make the debug version of finished installer script
- "{debugScriptName}" ƒ {scriptName}
- # make a copy of the finished installer script and rename the copy
- Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
- # add the installer debugger resources to the copied installer script
- Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
-
- # make the standard version of finished installer script
- "{scriptName}" ƒƒ makefile "{scriptName}.r" "{CompressedRsrcArchive}" "{SplitCompRsrcArchive1}" "{SplitRsrcArchive1}" "{localScriptCheckExtName}"
- # establish current date with time of NOON
- set theTime "'`date -d -s` 12:00:00 PM'"
- # rez the installer source into the form that the installer can read
- Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
- # establish filename for finished installer script, set creation date and time, set attributes
- SetFile -a b -d {theTime} "{scriptName}"
- # run scriptcheck utility on the rezzed installer script
- "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
- # set modification date and time for finished installer script
- SetFile -m {theTime} "{scriptName}"
-
- # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
- "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
- # copy and rename the original scriptcheck extension
- duplicate "{ScriptCheckExtension}" "{localScriptCheckExtName}"
-
- # do the simple resource compression
- "{CompressedRsrcArchive}" ƒ makefile "{SourceFileName}"
- # compress resource 'STR#' ( 9000 ) into a rsrc item within archive
- "{compressTool}" "{SourceFileName}" -k 'STR#'=9000 -a 'part'=9000 -o "{CompressedRsrcArchive}"
-
- # do the split compression
- "{SplitCompRsrcArchive1}" ƒ makefile "{SourceFileName}"
- # split resource 'STR#' ( 9001 ) into parts no larger than 7K
- "{splitTool}" "{SourceFileName}" -k 'STR#'=9100 -s 7000 -a 'temp'=9100 -o "{TempSplitFile}"
- # give the first split piece the original resource type, copy into an interim file
- echo "include ∂"{TempSplitFile}∂" 'temp'(9100) AS 'STR#'(9100);" | Rez -o "{TempRenamedFile1}" -t 'rsrc' -c 'RSED'
- # compress contents of first rsrc piece within interim file into first archive
- "{compressTool}" "{TempRenamedFile1}" -k 'STR#'=9100 -a part=9100 -o "{SplitCompRsrcArchive1}"
- # give the second split piece the original resource type, copy into another interim file
- echo "include ∂"{TempSplitFile}∂" 'temp'(9101) AS 'STR#'(9100);" | Rez -o "{TempRenamedFile2}" -t 'rsrc' -c 'RSED'
- # compress contents of second rsrc piece within interim file into second archive
- "{compressTool}" "{TempRenamedFile2}" -k 'STR#'=9100 -a part=9101 -o "{SplitCompRsrcArchive2}"
-
- # do the split w/o compression
- "{SplitRsrcArchive1}" ƒ makefile "{SourceFileName}"
- # split resource 'STR#' ( 9002 ) into parts no larger than 5K
- "{splitTool}" "{SourceFileName}" -k 'STR#'=9200 -s 5000 -a 'part'=9200 -o "{TempSplitFile2}"
- # copy contents of first rsrc piece within interim file into first archive
- Derez "{TempSplitFile2}" -only "'part'(9200)" | Rez -o "{SplitRsrcArchive1}" -t 'rsrc' -c 'RSED' -a
- # copy contents of second rsrc piece within interim file into second archive
- Derez "{TempSplitFile2}" -only "'part'(9201)" | Rez -o "{SplitRsrcArchive2}" -t 'rsrc' -c 'RSED' -a
-
-